/*
 * @Description: 
 * @Author: handongliang dongliang.han@12301.cn
 * @Date: 2023-09-12 15:15:39
 * @LastEditTime: 2023-12-03 10:46:26
 */
import BarYCategory1 from "@/components/BarYCategory/new";

const Top5 = (props: any) => {
    const { data, unit, multipleColor } = props
    return (
        <div className="w-full">
            <BarYCategory1
                data={data}
                multipleColor={multipleColor}
                formatter={(item: any) => {
                    return item.value;
                }}
                unit={unit ? unit : '元'}
                titleLabel={false}
                legendStyle={{
                    itemGap: {
                        paddingTop: 10,
                        paddingBottom: 10,
                    },
                }}
                textStyle={{
                    valueLabel: {
                        width: 100,
                        textAlign: 'center',
                        paddingLeft: 0,
                        paddingRight: 0,
                        fontSize: 20
                    },
                    unitLabel: {
                        fontSize: '24px',
                        marginLeft: 5
                    },
                    axisLabel: {
                        width: 130,
                        textAlign: 'center',
                        overflow: 'hidden',
                        whiteSpace: 'nowrap',
                        fontFamily: 'Source Han Sans CN',
                        textOverflow: 'ellipsis',
                        paddingLeft: 0,
                        paddingRight: 0,
                    },
                }}
                itemStyle={{
                    itemGap: {
                        flex: 1,
                        paddingTop: 15,
                        paddingBottom: 0,
                    },

                }}
            />
        </div>
    )
}
export default Top5
